// 加载APP提示Trust anchor for certification path not found
// jadx寻找，找到这个包下的这个函数，返回
Java.perform(function () {

    // 先找到目标类
    var TrustManagerImpl = Java.use('com.android.org.conscrypt.TrustManagerImpl'); // 替换为实际的类路径
    TrustManagerImpl.checkTrustedRecursive.implementation = function (certs, ocspData, tlsSctData, host, clientAuth, untrustedChain, trustAnchorChain, used) {
        // var res = this.checkTrusterRecursive(untrustedChain, trustAnchorChain, host, clientAuth, ocspData, tlsSctData)
        var res = this.checkTrusterRecursive(certs, ocspData, tlsSctData, host, clientAuth, untrustedChain, trustAnchorChain, used)
        return res;
    }
});

// frida -UF -l  0_hook_charles.js